<div class="task-track-list">

  <div class="add-project">
    <label for="keyWord" class="project-search">
      <input class="key-word" type="text" name="keyWord" id="keyWord" placeholder="搜索" ng-model="vm.keyWord" ng-keydown="vm.searchProject($event)">
      <span class="search-btn icon iconfont icon-icon-search" ng-click="vm.searchProject()"></span>
    </label>
    <button class="add button-default" ng-click="vm.showModal(vm.currentProject)"><i class="iconfont icon-add"></i> 新增项目</button>
  </div>

  <div class="project-list">
    
    <div class="list-table">
        <div class="head-box">
          <div class="list-head first">项目名称</div>
          <div class="list-head">上线时间</div>
          <div class="list-head">负责人</div>
          <div class="list-head">任务文件</div>
          <div class="list-head">状态</div>
          <div class="list-head">更新操作</div>
          <div class="list-head">查看详情</div>
          <div class="list-head">编辑/删除</div>
        </div>
        <div class="list-box" ng-repeat="project in vm.taskPlanList.dataList track by project.projectId">
          <div class="list-cell first" title="{{project.projectName}}"><i class="iconfont icon-folder"></i> <span ng-bind="project.projectName"></span></div>
          <div class="list-cell" title="{{project.dateText}}" ng-bind="project.dateText"></div>
          <div class="list-cell" title="{{project.executor}}" ng-bind="project.executor"></div>
          <div class="list-cell" title="{{project.projectFileName}}" ng-bind="project.projectFileName"></div>
          <div class="list-cell" title="{{vm.projectStatus[project.status]}}" ng-bind="vm.projectStatus[project.status]"></div>
          <div class="list-cell"><i class="iconfont icon-set" ui-sref="menu.tasktrack.info({taskId:project.projectId})"></i></div>
          <div class="list-cell"><i class="iconfont icon-progressbar" ui-sref="menu.tasktrack.panel({taskId:project.projectId})"></i></div>
          <div class="list-cell">
            <div class="project-opreator">
              <i ng-if="project.status=='1'" class="iconfont icon-edite" ng-click="vm.showModal(project)"></i>
              <div ng-if="project.status=='1'" class="delete-project" confirm-popup="vm.delProject(project.projectId)" confirm-title="'删除项目'" confirm-content="'项目删除后就不能恢复了，请确认是否继续？'">
                <i class="iconfont icon-icon-delete"></i>
              </div>
            </div>
          </div>
        </div>
     </div>

    <div class="pagination-box">
      <pagination conf="vm.paginationOpt"></pagination>
    </div>
  </div>



  <div class="modal fade add-project" id="addPorject" tabindex="-1" role="dialog" data-backdrop="static">
    <div class="modal-dialog" role="document">
      <div class="modal-content modal-info">
        <div class="operator-title">
          <h4 class="modal-header" ng-if="!vm.currentProject.projectId">新增项目</h4>
          <h4 class="modal-header" ng-if="vm.currentProject.projectId">编辑项目</h4>
          <div class="modal-close iconfont icon-close" ng-click="vm.colseModal()"></div>
          
          <div class="content_detail">
            <div class="row">
              <div class="col-xs-7 modal-left">
                <div class="form-group clearfix">
                  <label for="projectName" class="col-xs-4 item-label project-name">项目名称<span class="start">*</span></label>
                  <div class="col-xs-8">
                    <input class="form-control" type="text" name="projectName" id="projectName" ng-model="vm.currentProject.projectName" ng-focus="vm.projectValid.projectName=''" placeholder="请输入项目名称">
                    <p class="err-message bg-danger" ng-if="vm.projectValid.projectName==='empty'">项目名称不可为空</p>
                    <p class="err-message bg-danger" ng-if="vm.projectValid.projectName==='long'">请输入100字符以内的名称</p>
                  </div>
                </div>
                <div class="form-group clearfix">
                  <label for="executor" class="col-xs-4 item-label executor">负责人<span class="start">*</span></label>
                  <div class="col-xs-8">
                    <input class="form-control" type="text" name="executor" id="executor" ng-model="vm.currentProject.executor" ng-focus="vm.projectValid.executor=''" placeholder="请输入负责人">
                    <p class="err-message bg-danger" ng-if="vm.projectValid.executor==='empty'">负责人不可为空</p>
                    <p class="err-message bg-danger" ng-if="vm.projectValid.executor==='long'">请输入100字符以内的名称</p>
                  </div>
                </div>
                <div class="form-group clearfix">
                  <label for="dateText" class="col-xs-4 item-label date-text">上线时间<span class="start">*</span></label>
                  <div class="col-xs-8">
                    <input class="form-control" id="dateText" name="dateText" type="text" readonly="readonly" ng-model="vm.currentProject.dateText">
                  </div>
                </div>
              </div>

              <div class="col-xs-5 modal-right">
                <span class="upLoad-title">上传附件</span><span class="start">*</span>
                <p class="err-message bg-danger file-err" ng-if="vm.projectValid.file==='empty'">请选择文件</p>
                <p class="err-message bg-danger file-err" ng-if="vm.projectValid.file==='innegal'">请选择xls文件</p>
                <div class="file-icon upLoad-photo" ng-class="{'file-chosen':vm.projectFile.name}">
                  <i class="iconfont icon-excelfile"></i>
                </div>
                <a id="downloadFile" class="project-download-href"></a>
                <button class="button-common" ng-if="!vm.projectFile.name" onclick="$('#projectFile').click()" ng-click="vm.projectValid.file=''">选择文件</button>
                <button class="button-common" ng-if="!vm.currentProject.fileStatus && vm.projectFile.name && vm.currentProject.projectId" ng-click="vm.downloadProFile(vm.currentProject.projectId)">下载文件</button>
                <div class="name-box" ng-if="vm.projectFile.name">
                  <p title="{{vm.projectFile.name}}" class="file-name" ng-bind="vm.projectFile.name"></p>
                  <i class="iconfont icon-icon-delete" ng-click="vm.projectFile={};vm.currentProject.fileStatus='changed'"></i>
                </div>
                  <input class="project-input" type="file" file-local-read="vm.projectFile" id="projectFile" accept="application/vnd.ms-excel,.csv,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet">
              </div>

              <div class="col-xs-12 modal-project-dsc">
                <div class="form-group clearfix">
                  <label for="projectDsc" class="col-xs-2 projectDsc">项目描述</label>
                  <div class="col-xs-10 text-area">
                    <textarea class="form-control" type="text" name="projectDsc" id="projectDsc" ng-model="vm.currentProject.description" class="project-dsc"></textarea>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class="line-bottom-btn text-center">
          <span class="bottom-line"></span>
          <div class="modal-button clearfix">
            <button aria-label="Close" ng-click="vm.saveProject()">确定</button>
            <button data-dismiss="modal" aria-label="Close" ng-click="vm.colseModal()">取消</button>
          </div>
        </div>
      </div>
    </div>
  </div>


</div>